package com.tools.payhelper.utils;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * TODO:
 *
 * @author hm
 * @date 2018/5/18
 * @copyright
 */
public class ThreadPoolUtils {

        private static final ThreadPoolExecutor dataThreadPool = new ThreadPoolExecutor(3, 6, 5, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(10), new ThreadPoolExecutor.DiscardOldestPolicy());
        public static void execute(Runnable runnable) {
            dataThreadPool.execute(runnable);
        }


    }
